<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
		<title>Insert title here</title>
		<link rel="stylesheet" href="../css/reg.css" type="text/css"></link>
		<script type="text/javascript"
			src="../js/jquery-validation-1.10.0/lib/jquery-1.7.2.js"></script>
		<script type="text/javascript">  
		function updateUser(state,id){
		
			$.ajax({
  			type: "POST",
   			url: "admin!updateUserState.action",
   			data: "id="+id+"&state="+state,
   			success:function(){
   				
   				if(state==0){
   				$("#td_"+id).html("正常");
   				$("#upbtn_"+id).replaceWith("<input id='upbtn_"+id+"' type='button' value='封停' onClick='updateUser(1,"+id+")'/>");
   				
   				}else{
   				$("#td_"+id).html("停用");
   				$("#upbtn_"+id).replaceWith("<input id='upbtn_"+id+"' type='button' value='恢复正常' onClick='updateUser(0,"+id+")'/>");
   				
   				}
   			}
			});
		
		}
		
		</script>
		<link rel="stylesheet" href="../css/Style.css" type="text/css"></link>
	</head>
	<body>
		<table width="980px" border="0" cellspacing="0" cellpadding="0"
			align="center">
			<tr>
				<td width="50%" height=80 rowspan=2>
					<div class=Mleft>

						<img src="../imgs/logo.gif" border=0>
					</div>
				</td>
				<td width="50%">
					<span id=AjaxShow></span>
					<br>
				</td>
			</tr>
			<tr>
				<td valign=bottom align=right>
					欢迎您：
					<strong><font color=red>沉黙de泠栤</font> </strong>
					<a href=/login.asp?Action=Logout target=_parent>退出</a>
				</td>
			</tr>
		</table>
		<table id=div border="0" cellspacing="0" cellpadding="0" align=center>
			<tr>
				<td>
					<img src=../imgs/center_top.gif>
				</td>
			</tr>
			<tr>
				<td
					style='padding: 5px; border-left: 1px #CCCCCC solid; border-right: 1px #CCCCCC solid'>
					<table border="0" cellspacing="0" cellpadding="0" align=center>
						<tr>
							<td width="155" valign=top>
								<jsp:include page="../frame/adminLeft.jsp" />
							</td>
							<td width="810" valign="top">
								<div class=UserPath>
									您的位置：
									<a href=Index.asp>系统管理</a> >
									<a href=User_ClassAD.asp?ChannelID=2>审核信息管理</a>
								</div>

								<form action="<%=path%>/saveGoods/saveGoods!saveGood.action"
									enctype="multipart/form-data" method=POST>
									<table width='100%' cellpadding=0 cellspacing=1 class=td1>


										<tr>
											<td colspan=2 Class=td4>
												审核分类信息

											</td>
										</tr>
										<tr>
											<td width='50%' valign='top'>
												<table width='100%' cellpadding='0' cellspacing='0'>
													<tr>

														<td width='50%' valign='top'>
															<table width='100%' cellpadding='0' cellspacing='0'>
																
															</table>
														</td>

													</tr>

												</table>
											</td>
										</tr>
										<table width='100%' border='0' cellpadding='0' cellspacing='0'>
										<tr>
																	<td Class=ssdq>
																		<strong>所属分类  </strong>
																	</td>
																	<td Class=td6>
																		<c:forEach items="${good.categorys}" var="cate">
																			${cate.name }
																		</c:forEach>
																		<span id=ClassID1></span>
																	</td>
																</tr>
										<tr Class=td2>
												<td width='20%'>
													<strong>商品编号 </strong>
												</td>
												<td width='80%'>
													${good.id }
												</td>
											</tr>
											<tr Class=td2>
												<td width='20%'>
													<strong>信息标题  </strong>
												</td>
												<td width='80%'>
													${good.name }
												</td>
											</tr>
											<tr Class=td2>
												<td width='20%'>
													<strong>发布时间  </strong>
												</td>
												<td width='80%'>
													<fmt:formatDate value="${good.startTime }" type="both" />
												</td>
											</tr>
											<tr Class=td2>
												<td>
													<strong>发布天数</strong>
												</td>
												<td>
													${good.postDays }天
												</td>
											</tr>
											<tr Class=td2>
												<td width='20%'>
													<strong>结束时间 </strong>
												</td>
												<td width='80%'>
													<fmt:formatDate value="${good.stopTime }" type="both" />
												</td>
											</tr>
											<tr Class=td2>
												<td valign=top>
													<strong>内容介绍 </strong>
													<br>

												</td>
												<td>
													${good.content }

												</td>
											</tr>

											<tr Class=td2>
												<td valign=top>
													<strong>图片</strong>
													<br>
												</td>
												<td>
													<c:forEach items="${good.pic}" var="pic">
														<img style="CURSOR: hand" onclick="window.open(this.src)"
															src="<%=path%>/user_images_${good.seller.id }/${pic.picUrl}"
															width="500" height="373">
													</c:forEach>

												</td>
											</tr>
											<tr Class=td2>
												<td>
													<strong>新旧程度</strong>
												</td>
												<td>
													${good.quality }成新
												</td>
											</tr>

											
											<tr Class=td2>
												<td>
													<strong>联系人</strong>
												</td>
												<td>
													${good.contact }
												</td>
											</tr>

											<tr Class=td2>
												<td>
													<strong>Email <font color='#FF0000'>*</font> </strong>
												</td>
												<td>
													${good.email }
												</td>
											</tr>
											<tr Class=td2>
												<td>
													<strong>联系电话</strong>
												</td>
												<td>
													${good.phone }
												</td>
											</tr>

											<tr Class=td2>
												<td>
													<strong>联系地址</strong>
												</td>
												<td>
													${good.address }
												</td>
											</tr>

											<tr Class=td2>
												<td>
													<strong>QQ</strong>
												</td>
												<td>
													${good.qq}
												</td>
											</tr>

											<tr Class=td2 align="middle" valign="middle">
												<td>
													<br>
												</td>
												<td>
													<input type="button" value='审核通过' onclick="window.location.href='<%=path %>/admin/admin!updateGoodsState.action?state=2&id=${good.id }'">
													<input type="button" value='审核不通过'onclick="window.location.href='<%=path %>/admin/admin!updateGoodsState.action?state=1&id=${good.id }'">
												</td>
												<td>

												</td>

											</tr>

										</table>

									</table>
								</form>
							</td>

						</tr>
						<tr>
							<td>
								<img src="../imgs/center_bottom.gif">
							</td>
						</tr>
					</table>
				</td>

			</tr>

		</table>


	</body>
</html>
